package pikes.ecma;

import pikes.core.Printable;
import pikes.core.PrintableCharSequence;
import pikes.ecma.EcmaSyntaxVisitingException;
import pikes.ecma.SourceElement;
import pikes.ecma.SyntaxTreeVisitor;

public class MockSyntaxTreeVisitor implements SyntaxTreeVisitor {

	public SourceElement sourceElement = null;

	public Printable identifier = null;

	public boolean isBeforeFunctionBody = false;

	public boolean isAfterFunctionBody = false;

	public boolean isBeforeParameterList = false;

	public boolean isAfterParameterList = false;

	public boolean isBeforeVariableDeclaration = false;

	public boolean isEqualSign = false;

	public boolean isComma = false;

	public boolean isEndOfStatement = false;

	public boolean isFunction = false;

	public boolean isWhiteSpace = false;

	public boolean isReturn = false;

	public CharSequence binaryOperator = null;

	public boolean isDot = false;

	public void visitSourceElement(SourceElement sourceElement) throws EcmaSyntaxVisitingException {
		this.sourceElement = sourceElement;
	}

	public void closeCurlyBrace() throws EcmaSyntaxVisitingException {
		isAfterFunctionBody = true;
	}

	public void openCurlyBrace() throws EcmaSyntaxVisitingException {
		isBeforeFunctionBody = true;
	}

	public void beforeVariableDeclarations() throws EcmaSyntaxVisitingException {
		isBeforeVariableDeclaration = true;
	}

	public void equalSign() throws EcmaSyntaxVisitingException {
		isEqualSign = true;

	}

	public void identifier(CharSequence text) throws EcmaSyntaxVisitingException {
		this.identifier = new PrintableCharSequence(text);
	}

	public void afterParameterList() throws EcmaSyntaxVisitingException {
		this.isAfterParameterList = true;
	}

	public void beforeParameterList() throws EcmaSyntaxVisitingException {
		this.isBeforeParameterList = true;

	}

	public void comma() throws EcmaSyntaxVisitingException {
		this.isComma = true;
	}

	public void endOfStatement() throws EcmaSyntaxVisitingException {
		this.isEndOfStatement = true;
	}

	public void binaryOperator(CharSequence operator) throws EcmaSyntaxVisitingException {
		this.binaryOperator = operator;
	}

	public void dotOperator() throws EcmaSyntaxVisitingException {
		this.isDot = true;
	}

	public void Function() throws EcmaSyntaxVisitingException {
		isFunction = true;
	}

	public void New() throws EcmaSyntaxVisitingException {
		// TODO Auto-generated method stub

	}

	public void Return() throws EcmaSyntaxVisitingException {
		isReturn = true;
	}

	public void Do() throws EcmaSyntaxVisitingException {
		// TODO Auto-generated method stub

	}

	public void While() throws EcmaSyntaxVisitingException {
		// TODO Auto-generated method stub

	}

	public void Else() throws EcmaSyntaxVisitingException {
		// TODO Auto-generated method stub

	}

	public void If() throws EcmaSyntaxVisitingException {
		// TODO Auto-generated method stub

	}

	public void colon() throws EcmaSyntaxVisitingException {
		// TODO Auto-generated method stub

	}

	public void questionMark() throws EcmaSyntaxVisitingException {
		// TODO Auto-generated method stub

	}

	public void whiteSpace() throws EcmaSyntaxVisitingException {
		isWhiteSpace = true;
	}

	public void stringQuote() throws EcmaSyntaxVisitingException {
		// TODO Auto-generated method stub

	}

	public void closeSquaredBrace() throws EcmaSyntaxVisitingException {
		// TODO Auto-generated method stub

	}

	public void openSquaredBrace() throws EcmaSyntaxVisitingException {
		// TODO Auto-generated method stub

	}

	public void beforeSourceElement() throws EcmaSyntaxVisitingException {
		// TODO Auto-generated method stub

	}

	public void identifier(Printable text) throws EcmaSyntaxVisitingException {
		this.identifier = text;
	}

}
